home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / The Essential Hack / README < prev    next >
Encoding:
Text File  |  1992-06-23  |  1.4 KB  |  43 lines  |  [TEXT/MPS ]

  1. The Essential Hack.
  2. Written for MacHack ’92 by Allan Foster and Scott Boyd.
  3.  
  4. This hack simply counts traps and draws the counters (literally)
  5. into the menu bar.
  6.  
  7. The hack demonstrates how to:
  8. • head-patch a trap
  9. • tail-patch a trap
  10. • add a filter to a filter proc
  11. • draw into the window manager port
  12. • use Gestalt to communicate between extension code and an app
  13. • unhook patch code
  14. • do all of this without trashing registers
  15.  
  16. This code is meant to help you better understand some of the essential
  17. hacking techniques.  We hope you find it instructional.
  18.  
  19. We’ve included a second patching file which shows a much simpler
  20. way to patch, but it lagged behind Essential.a, and is missing about
  21. two days worth of work.
  22.  
  23. While we tried hard to be clean, no code is perfect, especially
  24. code which changes right up to the time the code is presented to
  25. a couple hundred hungry hackers.
  26.  
  27. If you find bugs or make improvements to the code, we’d appreciate
  28. hearing from you.  If you’d like to give a similar talk at MacHack ’93,
  29. we’d really like to hear from you.  Also, if there are more topics like
  30. this you’d like to see covered at MacHack, we’re eager to hear your
  31. suggestions.
  32.  
  33. Feel free to contact us at AppleLink SCOTT and ALLAN.
  34.  
  35. To build the extension:
  36.     
  37.     asm essential.a
  38.     link essential.a.o showinit.a.o -o Essential -rt INIT=0 ∂
  39.         -c Sntl -t INIT -sg Essential
  40.  
  41. To try it out:
  42.     duplicate Essential "{systemfolder}"extensions: 
  43.     shutdown -r